#ifndef FILESYSTEM_H
#define FILESYSTEM_H

namespace Cvekas {

/// \brief Provides information about files 
/// Used as a placeholder till virtual filesystem will be implemented.
class Filesystem
{
public:
	// TODO: add default redirection (to use if redir. file not found) 
	/// Initializes filesystem services.
	/// For now, looks for resources.redirect file and modifies resource paths accordingly.
	static void init();

	/// Same as init(), just adds additional string to base path.
	static void init(const std::string& subdir);

	/// Returns true if file with specified path exists. Does not use resource path redirection!
	static bool fileExists(const std::string& path);

	/// Returns proper, redirected if neccessary, path to resource file.
	static std::string redirect(const std::string& path);

	/// Reads whole text file to std::string object
	static std::string readFileToString(const std::string& path);

	/// Writes string to file
	static void writeStringToFile(const std::string& path, const std::string& str);
};

} // namespace

#endif